<template>
  <div>
    <TypeNav />
    <ListContainer />
    <TodayRecommend />
    <Rank />
    <Like />
    <Floor v-for="(floor, index) in floorList" :key="index" :list="floor" />
    <Brand />
  </div>
</template>

<script>
import ListContainer from "./ListContainer/index";
import TodayRecommend from "./TodayRecommend/index";
import Rank from "./Rank/index";
import Like from "./Like/index";
import Floor from "./floor/index";
import Brand from "./Brand/index";
import { mapState } from "vuex";
export default {
  components: { ListContainer, TodayRecommend, Rank, Like, Floor, Brand },
  mounted() {
    //floor组件需要的数据，在父组件发起网络请求
    this.$store.dispatch("home/getFloorList");
  },
  computed: {
    ...mapState({
      floorList: (state) => state.home.floorList,
    }),
  },
};
</script>

<style>
</style>